package com.yeswater.multithread.chapter1.test1_12.test3;

/**
 * author : yeswater
 * date : 2023/10/19
 */

public class MyObject {

    private String username = "1";

    private String password = "11";

    public String getUsername() {
        return username;
    }

    public void setValue(String username, String password) {
        this.username = username;
        if (Thread.currentThread().getName().equals("a")) {
            System.out.println("suspend thread : a");
            Thread.currentThread().suspend();
        }
        this.password = password;
    }

    public void printUsernamePassword() {
        System.out.println(username + " " + password);
    }
}
